Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

292
Visualizações
How to start docker with "node -r esm app.js"?

I have installed esm package and application is working fine when using "node -r esm app.js" for local server but for production server How to make it work same with the docker?

If someone could either help me with this loading the esm module it would be appreciated..

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Your node installation likely doesn't use globally installed modules. You need to correctly set the NODE_PATH environment variable to point either to the global node modules or those in your app folder, it should work.

Say if you are using the official node docker image as a base and you are installing your stuff with npm install -g or npm install && npm link, then you need to set

ENV NODE_PATH=/usr/local/lib/node_modules

in the dockerfile.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda